import request from '@/utils/request';

// 获取媒体资源列表
export function getMediaList() {
  return request({
    url: '/media',
    method: 'get'
  });
}

// 删除媒体资源
export function deleteMedia(id) {
  return request({
    url: `/media/${id}`,
    method: 'delete'
  });
}

// 更新媒体资源
export function updateMedia(data) {
  return request({
    url: `/media/${data.resourceId}`,
    method: 'put',
    data
  });
}